package com.adams.dcxt.dao;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.adams.dcxt.bean.Dishes;
import com.adams.dcxt.core.HibernateDao;
import com.adams.dcxt.core.Page;

@Repository("dishesDao")
public class DishesDaoImpl extends HibernateDao<Dishes, Long> implements DishesDao {

    @Override
    public Page<Dishes> queryDishesById(Page<Dishes> page, Long id) {
        String hql = " from   Dishes  where dishesType.id = :typeId ";
        Map values = new HashMap();
        values.put("typeId", id);
        Page<Dishes> pages = this.queryPage(page, hql, values);
        return pages;
    }

}
